import dgl
import numpy as np
import paddorch as th
from dgl.nn import GATConv
import dgl
import dgl.nn.paddorch as nn
import dgl.function as fn
import backend as F
import networkx as nx
def run_GAT():
    print("test_GAT")

    g = dgl.graph(([0, 1, 2, 3, 2, 5], [1, 2, 3, 4, 0, 3]))
    g = dgl.add_self_loop(g)
    feat = th.ones(6, 10)
    gatconv = GATConv(10, 2, num_heads=3)
    res = gatconv(g, feat)
    th.sum(res).backward()
    print("success")
    return  res


if __name__ == '__main__':
    run_GAT()

